using UnityEngine;

public class BillboardDummy
{
	public Vector3 Position;

	public BillboardUnit BillboardUnit;

	public Transform Parent;

	public void Show(GameObject PrefabObj)
	{
		GameObject gameObject = Object.Instantiate(PrefabObj);
		BillboardUnit = gameObject.GetComponent<BillboardUnit>();
		gameObject.transform.parent = Parent;
		gameObject.transform.position = Position + new Vector3(0f, BillboardUnit.AdditionalHeight, 0f);
	}

	public void Hide()
	{
		if (Application.isPlaying)
		{
			Object.Destroy(BillboardUnit.gameObject);
		}
		else
		{
			Object.DestroyImmediate(BillboardUnit.gameObject);
		}
	}
}
